package com.lee.ssm.service.impl;

import com.github.pagehelper.PageHelper;
import com.lee.ssm.dao.IOrderDao;
import com.lee.ssm.domain.Orders;
import com.lee.ssm.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("iOrderService")
public class OrderServiceImpl implements IOrderService {

    @Autowired
    private IOrderDao iOrderDao;

    @Override
    public List<Orders> findAll(int page, int size) {
        PageHelper.startPage(page, size);
        List<Orders> orders= iOrderDao.findAll();
        return orders;
    }

    @Override
    public Orders findById(String odersId) {
        return iOrderDao.findById(odersId);
    }
}
